The present invention relates generally to raster graphics processing.
As the availability, affordability, and use of publishing systems increase, techniques for preparing and reproducing pages on a variety of output devices have been developed. Output devices may include image setters, printers, monitors including liquid crystal displays and digital printing presses. A page may include various types of objects such as text, line art, and images, and its appearance is generally described by page description language (PDL) instructions. PDL instructions are generally executed or interpreted by an output device to generate physical output having the desired appearance.
A color page additionally includes information about the colors used in the page. Colors are described in accordance with a xe2x80x9ccolor space,xe2x80x9d which defines a data representation in terms of basic color components or colorants. The CMYK color space has four colorants (cyan (C), magenta (M), yellow (Y), and key (K) or black) and represents the color to be applied at a particular location on the page as a combination of four values: one representing the amount of cyan; one representing the amount of magenta; one representing the amount of yellow; and one representing the amount of black. In contrast, the CIELAB (Commission Internationale de l""Éclairage) color space has three colorants, representing color as a combination of three values: one which represents luminosity (L); and two (A and B) which, in combination, represent chromaticity. Luminosity refers to the overall brightness of a color. Chromaticity refers to the quality of a color characterized by its dominant and complementary wavelength and purity taken together.
These color data representations are used to create color separations which, in turn, are used by output devices to generate a color output page. Generally, one separation is created for each colorant in the device""s color space. For example, the PDL representation of a page to be output by an image setter using the CMYK color space is used to create four color separations, one for each colorant cyan, magenta, yellow, and black. Each separation indicates where on the page the corresponding ink should be applied. The same color data representation, if output on a CRT or LCD using a RGB (red-green-blue) color system, is used to create color separations for red, green, and blue.
Raster images are composed of a predetermined number of picture elements (pixels). The level of detail in a raster image is determined by the number of pixels in the image. Color raster images are defined in terms of a xe2x80x9ccolor spacexe2x80x9d, which is related to real or imaginary color as presented on a display device such as a monitor, liquid crystal display and color printer.
A pixel""s color is generally represented by a series of bits (the xe2x80x9ccolor valuexe2x80x9d), with specific bits indicating a visual output intensity for each sub-pixel used in the color. The specific sub-pixels depend on the color system used. Thus, a 24-bit RGB data representation may allocate bits 0-7 to indicate the amount of blue, bits 8-15 to indicate the amount of green, and bits 16-23 to indicate the amount of red. Such a representation can produce any one of nearly 17 million different pixel colors (i.e., the number of unique combinations of 256 input values of red, green, and blue). By contrast, systems that allocate fewer bits of memory to storing color data can produce only images having a limited number of colors. For example, an 8-bit color image can include only 256 different colors.
In some graphics applications, users blend objects to produce lifelike results. For example, in some conventional drawing applications, diffusion is blending technique used to simulate physically based phenomena. Diffusion, as used in computer graphics, refers to a process for deriving a property value (often color or opacity) for a pixel from surrounding pixels.
In one aspect the invention provides a method for simulating diffusion on an input raster. The method includes receiving an input raster for a region, the input raster including one or more objects having fixed parameter values and one or more areas of the region over which the parameter is to be diffused. The method defines a first and second raster that cover the region where the first raster includes parameter values and the second raster includes set values designating locations corresponding to one or more objects. Diffusion values are computed for one or more areas of the region. The first and second rasters are reduced until a predefined end condition is met, and then expanded back to an original size.
Aspects of the invention can include one or more of the following advantages. Color or opacity values can be easily diffused on a raster. One or more pixels in a raster can be fixed and a diffusion process can be defined to operate on other pixels in the raster to produce a desirable result. The apparatus can produce color or opacity values for any nonfixed pixels so as to achieve a smoothly changing field of pixels that interpolates the initial values fixed by the user. The computed blend conforms to the shape of the initially fixed values, no matter what their configuration.